import type { FormItemWidget } from '@/types'
import { FormType } from '@/types/enum'

interface IFormWidget {
  title: string
  children: Array<FormItemWidget>
}

// 表单组件列表
export const formWidgetList: Array<IFormWidget> = [
  {
    title: '输入组件',
    children: [
      { type: FormType.Input, label: '文本框', icon: 'ic:sharp-text-fields' },
      { type: FormType.Textarea, label: '文本域', icon: 'bi:textarea-t' },
      { type: FormType.InputNumber, label: '数字框', icon: 'mdi:signature-text' },
      { type: FormType.InputGroup, label: '文本框组', icon: 'uim:object-ungroup' },
      { type: FormType.Password, label: '密码框', icon: 'ic:round-password' },
      { type: FormType.RichText, label: '富文本', icon: 'ic:round-password' },
    ],
  },
  {
    title: '选择组件',
    children: [
      { type: FormType.Radio, label: '单选', icon: 'mdi:signature-text' },
      { type: FormType.Checkbox, label: '多选', icon: 'bi:textarea-t' },
      { type: FormType.Select, label: '下拉选择', icon: 'ic:sharp-text-fields' },
      { type: FormType.Switch, label: '开关选择', icon: 'ic:round-password' },
      { type: FormType.Cascader, label: '级联选择', icon: 'uim:object-ungroup' },
      { type: FormType.TreeSelect, label: '树级选择', icon: 'uim:object-ungroup' },
      { type: FormType.Slider, label: '滑块选择', icon: 'uim:object-ungroup' },
      { type: FormType.Rate, label: '评分选择', icon: 'uim:object-ungroup' },
      { type: FormType.ColorPicker, label: '颜色选择', icon: 'uim:object-ungroup' },
    ],
  },
  {
    title: '组织架构',
    children: [
      { type: FormType.Rate, label: '员工选择', icon: 'uim:object-ungroup' },
      { type: FormType.Rate, label: '部门选择', icon: 'uim:object-ungroup' },
      { type: FormType.Rate, label: '职位选择', icon: 'uim:object-ungroup' },
      { type: FormType.Rate, label: '审批人选择', icon: 'uim:object-ungroup' },
    ],
  },
  {
    title: '日期组件',
    children: [
      { type: FormType.DatePicker, label: '单选日期', icon: 'ic:sharp-text-fields' },
      { type: FormType.DatePicker, label: '多选日期', icon: 'ic:sharp-text-fields' },
      { type: FormType.DateRangePicker, label: '范围日期', icon: 'ic:sharp-text-fields' },
      { type: FormType.TimePicker, label: '时间选择器', icon: 'ic:sharp-text-fields' },
    ],
  },
  {
    title: '子表单组件',
    children: [
      { type: FormType.CardList, label: '列表表单', icon: 'ic:sharp-text-fields' },
      { type: FormType.TabList, label: '选项卡表单', icon: 'ic:sharp-text-fields' },
      { type: FormType.TableList, label: '表格表单', icon: 'ic:sharp-text-fields' },
    ],
  },
  {
    title: '位置组件',
    children: [
      { type: FormType.TabList, label: '地图', icon: 'ic:sharp-text-fields' },
      { type: FormType.TabList, label: '省市区', icon: 'ic:sharp-text-fields' },
    ],
  },
  {
    title: '上传组件',
    children: [
      { type: FormType.TabList, label: '图片', icon: 'ic:sharp-text-fields' },
      { type: FormType.TabList, label: '音视频', icon: 'ic:sharp-text-fields' },
      { type: FormType.TabList, label: '文本文件', icon: 'ic:sharp-text-fields' },
    ],
  },
  {
    title: '其它组件',
    children: [
      { type: FormType.CardList, label: '签名', icon: 'ic:sharp-text-fields' },
      { type: FormType.CardList, label: '分页', icon: 'ic:sharp-text-fields' },
      { type: FormType.CardList, label: '矩阵量表', icon: 'ic:sharp-text-fields' },
      { type: FormType.CardList, label: '在线合同', icon: 'ic:sharp-text-fields' },
    ],
  },
]
